export interface RouteItem {
  menuname: Array<string>;
  asdefault?: boolean; // 默认显示
  path?: string;
  type?: boolean;
  component?: string | (() => any);
  isTabMenu?: boolean;
  tabTitle?: string;
}

export type RoutesConfig = RouteItem[];
const config: RoutesConfig = [
  // 系统设置-字典管理
  {
    menuname: ['系统设置', '字典管理'],
    path: '/tool/dict',
    asdefault: true,
    component: '../pages/tool/dict/index.tsx',
  },
  {
    menuname: ['系统设置', '字典管理'],
    path: '/tool/dict/add',
    asdefault: true,
    component: '../pages/tool/dict/child/view/index.tsx',
    tabTitle: '新增字典',
    type: true,
  },
  {
    menuname: ['系统设置', '字典管理'],
    path: '/tool/dict/edit',
    asdefault: true,
    component: '../pages/tool/dict/child/view/index.tsx',
    tabTitle: '修改字典',
    type: true,
  },
  {
    menuname: ['系统设置', '字典管理'],
    path: '/tool/dict/view',
    asdefault: true,
    component: '../pages/tool/dict/child/view/index.tsx',
    tabTitle: '查看字典',
    type: true,
  },
  {
    menuname: ['系统设置', '字典管理'],
    path: '/tool/dict/list',
    asdefault: true,
    component: '../pages/tool/dict/child/list/index.tsx',
    tabTitle: '字典数据',
    type: true,
  },
  {
    menuname: ['系统设置', '字典管理'],
    path: '/tool/dict/data/add',
    asdefault: true,
    component: '../pages/tool/dict/child/data/index.tsx',
    tabTitle: '新增字典数据',
    type: true,
  },
  {
    menuname: ['系统设置', '字典管理'],
    path: '/tool/dict/data/edit',
    asdefault: true,
    component: '../pages/tool/dict/child/data/index.tsx',
    tabTitle: '修改字典数据',
    type: true,
  },
  {
    menuname: ['系统设置', '字典管理'],
    path: '/tool/dict/data/view',
    asdefault: true,
    component: '../pages/tool/dict/child/data/index.tsx',
    tabTitle: '查看字典数据',
    type: true,
  },
];

export default config;
